package com.shawn.function;

public class TestMain {

	public static void main(String[] args) {
		SayHello sayHello = new SayHello() {
			@Override
			public void sayHello(String s) {
				System.out.println("匿名内部类方式: " + s);
			}
		};
		sayHello.sayHello("hello java");

		SayHello sayHello2 = (s)->{
			System.out.println("lambda expression方式: " + s);
		};
		sayHello2.sayHello("hello java");
	}

}
